Skip to main content

Morphological Gradient

Emphasizes the boundaries of objects in a binary or grayscale image by calculating the difference between the dilation and erosion of the image.

🖞ïļ Image options and parameters of morphologicalGradient method
🎭 Mask options and parameters of morphologicalGradient method

The morphological gradient is a mathematical operation used in image processing and mathematical morphology to highlight the boundaries of objects or regions within an image. It is a fundamental concept in morphological image analysis and is often used for tasks such as edge detection and image segmentation. The morphological gradient is based on the difference between an image after dilation and the same image after erosion.

Applying morphological gradient on Images:​

placeholderplaceholder
Ran in 0.00Ξs (Infinity ops/s)

Kinds of images compatible with algorithm​

Image propertyWhat it meansPossible values
bitDepthnumber of bits per channel[1,8,16]
componentsnumber of components[1]
alphais alpha channel allowedfalse

Parameters and default values​

info

Parameters and options for Images and Masks are the same.

  • options

Options​

PropertyRequiredDefault value
iterationsno1
kernelno[[1, 1, 1],[1, 1, 1],[1, 1, 1]]
info

The method is also available for Masks.